<!-- 门店排队 -->
<template>
	<view>
		<view class="line_info">
			<view><text class="line_tit">消费门店：</text><text class="line_con">{{supname}}</text></view>
			<view><text class="line_tit">消费金额：</text><text class="line_con">¥{{price}}</text></view>
			<view><text class="line_tit">最高待补贴：</text><text class="line_con">¥{{ratemoney}}</text></view>
			<!-- <view><text class="line_tit">待补贴金额：</text><text class="line_import">¥{{money}}</text></view> -->
			<view><text class="line_tit">已补贴金额：</text><text class="line_import">{{sendmoney}}</text></view>
		</view>
		<view class="line_list">
			<view class="line_item flex_between" v-for="item in list">
				<view>
					<view class="line_tit">{{item.title}}</view>
					<view class="line_con">{{item.createtime}}</view>
				</view>
				<view class="line_import">{{item.money_send}}</view>
			</view>
			<view class="empty_loading">
				<image v-if="isloading" src="/static/business/loading.gif" ></image>
				<view v-if="ismore">到底了~</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isloading: false,
				ismore: false,
				page: 0,
				list: [],
				id: 0,
				supname: '',
				price: '',
				ratemoney: '',
				money: '',
				sendmoney: ''
			};
		},
		onLoad(options) {
			if(options.id){
				this.id = options.id;
				this.supname = options.supname;
				this.price = options.price;
				this.ratemoney = options.ratemoney;
				this.money = options.money;
				this.sendmoney = options.sendmoney;
				this.getList();
			}
		},
		onReachBottom() {
			this.getList();
		},
		methods: {
			getList(){
				this.page++;
				this.isloading = true;
				this.$axios('lists/feeorderinfo','POST','order',{
					page: this.page,
					id: this.id
				}).then(res=>{
					this.isloading = false;
					if(res.data.code == 200){
						this.list = [...this.list,...res.data.data];
						this.ismore = res.data.data.length <= 0;
					}
				})
			},
		}
	}
</script>

<style lang="scss">
page{
	background: #FBF8FE;
	padding-bottom: 60rpx;
}
.line_info{
	padding: 10rpx 30rpx;
	line-height: 50rpx;
}
.line_tit{
	font-weight: 600;
}
.line_con{
	color: #999999;
}
.line_import{
	color: $bg-color;
	font-weight: 600;
}
.line_list{
	padding: 0 24rpx;
	.line_item{
		margin-bottom: 20rpx;
		background: #FFFFFF;
		border-radius: 12rpx;
		padding: 10rpx 20rpx;
		font-size: 26rpx;
		line-height: 44rpx;
		.line_tit{
			font-size: 28rpx;
		}
	}
}
</style>
